package com.mlh;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

import javax.management.MBeanNotificationInfo;

public class MyBeanPostProcessor implements BeanPostProcessor  {

    public Object postProcessBeforeInitialization(Object bean,String BeanName) throws BeansException {
        System.out.println("postProcessBeforeInitialization被调用"+ BeanName+"bean"+bean.getClass());
        return bean;
    }
    public Object postProcessAfterInitialization(Object bean,String BeanName) throws BeansException {
        System.out.println("postProcessAfterInitialization被调用"+ BeanName+"bean"+bean.getClass());
        return bean;
    }
}
